#include<stdio.h>

	void Num_trans(int a, int b)
	{
		int d, c;
		if (b % a == 0)
		{
			printf("1/%d", b / a);
			return;
		}
		d = b / a;
		c = d + 1;
		printf("1/%d+", c);
		a = a * c - b;
		b = b * c;

		Num_trans(a, b);
	}
	int main()
	{
		int a, b;
		scanf("%d/%d", &a, &b);
		Num_trans(a, b);

		return 0;
	}
	
